package com.example.lab.controller;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.lab.entity.User;
import com.example.lab.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class ForwordController {
    @Resource
    private UserService userService;
    @RequestMapping("admin")
    public String showAdmin(){
        return "admin";
    }
    @RequestMapping("equipment")
    public String showEquipment(){
        return "equipment";
    }
    @RequestMapping("lab")
    public String showLab(){
        return "lab";
    }
    @RequestMapping("lost")
    public String showLost(){
        return "lost";
    }
    @RequestMapping("message")
    public String showMessage(){
        return "message";
    }
    @RequestMapping("message1")
    public String showMessage1(){
        return "message1";
    }
    @RequestMapping("user")
    public ModelAndView showUser(String userN,ModelAndView modelAndView){
        modelAndView.addObject("userN",userN);
        modelAndView.setViewName("user");
        return modelAndView;
         }
    @RequestMapping("login")
    public String showLogin(){
        return "login";
    }
    @RequestMapping("loginadmin")
    public String showLoginadmin(){
        return "loginadmin";
    }
    @RequestMapping("register")
    public String showRegister(){
        return "register";
    }
    @RequestMapping("user1")
    public String showUser1(){
        return "user1";
    }
    @RequestMapping("equipment1")
    public String showEquipment1(){
        return "equipment1";
    }
    @RequestMapping("lost1")
    public String showLost1(){
        return "lost1";
    }
    @RequestMapping("admin1")
    public String showAdmin1(){
        return "admin1";
    }
    @RequestMapping("lab1")
    public String showLab1(){
        return "lab1";
    }
    @RequestMapping("/showIndex")
    public ModelAndView showIndex(String user,ModelAndView modelAndView){

        modelAndView.addObject("user",user);
        modelAndView.setViewName("index");
        return modelAndView; }
    @RequestMapping("/showindex1")
    public String showIndex1(){ return "index1"; }
    @RequestMapping("/view")
    public String showView(){ return "view"; }
}
